package com.xiubai.appforpda.entity;

import java.util.Comparator;

/**
 * @author: r3562939
 * @version: V1.0
 * @project: AppForPda
 * @description: description
 * @date: 2018/11/18
 * @time: 15:32
 */
public class SQLMainPamInventBean implements Comparable<SQLMainPamInventBean> {

    public String my_status;
    /**
     * billcode :盘点单号
     * assetcode  :设备编码
     * assetname  :设备名称
     * usercodeq :使用人（盘点前
     * usercodeh :盘点后）
     *  deptcodeq :使用部门（盘点前
     * deptcodeh :盘点后）
     * loccodeq :位置（盘点前
     * loccodeh :盘点后）
     * stacodeq :状态（盘点前
     * stacodeh : 盘点后）
     * bill_status :盘点状态
     */

    public String billcode = "";
    public String assetcode = "";
    public String assetname = "";
    public String usercodeq = "";
    public String usercodeh = usercodeq;
    public String deptcodeq = "";
    public String deptcodeh = deptcodeq;
    public String loccodeq = "";
    public String loccodeh = loccodeq;
    public String stacodeq = "";
    public String stacodeh = stacodeq;
    public String bill_status = "";
    public String operator = "";
    public String pamsum = "";


    @Override
    public boolean equals(Object obj) {
        if (obj instanceof SQLMainPamInventBean) {
            SQLMainPamInventBean bean = (SQLMainPamInventBean) obj;
            return billcode.equalsIgnoreCase(bean.billcode);
        }
        return false;
    }

    public String getBillcode() {
        return billcode;
    }

    public void setBillcode(String billcode) {
        this.billcode = billcode;
    }

    public String getAssetcode() {
        return assetcode;
    }

    public void setAssetcode(String assetcode) {
        this.assetcode = assetcode;
    }

    public String getAssetname() {
        return assetname;
    }

    public void setAssetname(String assetname) {
        this.assetname = assetname;
    }

    public String getUsercodeq() {
        return usercodeq;
    }

    public void setUsercodeq(String usercodeq) {
        this.usercodeq = usercodeq;
    }

    public String getUsercodeh() {
        return usercodeh;
    }

    public void setUsercodeh(String usercodeh) {
        this.usercodeh = usercodeh;
    }

    @Override
    public int compareTo(SQLMainPamInventBean o2) {
        int index1 = 0;
        if("Y".equals(bill_status)){
            index1 = 20;
        }else{
            index1 = 10;
        }

        int index2 = 0;
        if("Y".equals(o2.bill_status)){
            index2 = 20;
        }else{
            index2 = 10;
        }
        return index2 - index1;
    }

}
